﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Layout/SiteHead.master" AutoEventWireup="true" CodeBehind="SendMail.aspx.cs" Inherits="MailTool.Pages.SendMail" %>

<%@ Register Src="~/InfoControls/Pagination.ascx" TagName="Pagination" TagPrefix="suc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function isdatenull() {
            var search = $("#<%=txtSearch.ClientID%>").val();
            if (search == "") {
                alert("请输入要查询的内容或标签！");
                return false;
            }
            return true;
        }

        function checkInput() {
            var title = $("#<%=txtTitle.ClientID%>").val();
            if (title == "") {
                alert("请输入邮件标题！");
                return false;
            }

            if (!hasSelectRecord('ChkSelect')) {
                alert("请选择收件人！");
                return false;
            }

            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SubMinTitle" runat="server">
    <b>收件人：</b>请输入要查询的内容或标签：
                <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
    <asp:Button ID="BtnSearchRecord" OnClientClick="return isdatenull();" CssClass="right-button02"
        runat="server" OnClick="BtnSearchRecord_Click" Text="查 询" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <table id="subtree1" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="20">
                            <span class="newfont07">选择：<a href="#" class="right-font08" onclick="selectAll('ChkSelect');">全选</a>-<a
                                href="#" class="right-font08" onclick="unselectAll('ChkSelect');">反选</a></span>
                        </td>
                    </tr>
                    <tr>
                        <td height="40" class="font42">
                            <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646"
                                class="newfont03">
                                <tr class="CTitle">
                                    <td height="22" colspan="10" align="center" style="font-size: 16px">邀请人员列表
                                    </td>
                                </tr>
                                <tr align="center" bgcolor="#EEEEEE">
                                    <td align="center" height="30">选择
                                    </td>
                                    <td>姓名
                                    </td>
                                    <td>E-mail
                                    </td>
                                    <td>标签
                                    </td>
                                    <td>创建日期
                                    </td>
                                </tr>
                                <asp:Repeater ID="rptNewsList" runat="server">
                                    <ItemTemplate>
                                        <tr class="listitems <%#(rptNewsList.Items.Count%2==0?"odd":"even")%>">
                                            <td align="center" height="20" class="item40">
                                                <asp:HiddenField ID="HiddenId" runat="server" Value='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
                                                <asp:CheckBox ID="ChkSelect" runat="server" />
                                            </td>
                                            <td nowrap="nowrap">
                                                <%#Eval("UserName")%>
                                            </td>
                                            <td nowrap="nowrap">
                                                <%#Eval("Address")%>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%#Eval("Tag")%>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%# Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy-MM-dd")%>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </table>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="6">
                            <img alt="" src="../Style/images/spacer.gif" width="1" height="1" />
                        </td>
                    </tr>
                    <tr>
                        <td height="33">
                            <suc:Pagination ID="Pagination" PageSize="12" runat="server"></suc:Pagination>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <table style="width: 100%;">
        <tr>
            <td style="width: 70px;"><b>邮件标题：</b></td>
            <td>
                <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td><b>发件人：</b></td>
            <td>
                <asp:DropDownList ID="ddlSend" runat="server"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td><b>邮件模板：</b></td>
            <td>
                <asp:DropDownList ID="ddlTemplate" runat="server"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <asp:Button ID="btnSend" runat="server" CssClass="button" OnClientClick="return checkInput();" Text="开始发送" OnClick="btnSend_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainBody" runat="server">
</asp:Content>
